package com.example.item;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "帖子")
public class Post {
    @Schema(description = "帖子编号")
    @TableId(type = IdType.AUTO)
    private Integer postId;
    @Schema(description = "帖子标题")
    private String postName;
    @Schema(description = "帖子作者")
    private Integer postAuthor;
    @Schema(description = "页面种类（动态:1，志愿者招募:2）")
    private Integer postType;
    @Schema(description = "是否公开（是:1，否:0）")
    private Integer postAvaliable;
    @Schema(description = "帖子内容")
    private String postContent;
    @Schema(description = "城市地区")
    private Integer cityAreaId;
    @Schema(description = "帖子点赞数量")
    private Integer postLike;
    @Schema(description = "帖子评论数量")
    private Integer postComment;
    @Schema(description = "帖子收藏数量")
    private Integer postStar;
    @Schema(description = "帖子状态（0：正常，1：停用）")
    private Integer postStatus;
    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @Schema(description = "是否删除（是:1，否:0）")
    @TableLogic(value = "0", delval = "1")
    private Integer postIsdelete;
}
